//
//  HJChatBlacklistModel.m
//  KaiChat
//
//  Created by lx on 2023/11/29.
//

#import "HJChatBlacklistModel.h"

@implementation HJChatBlacklistModel

+ (NSArray *)bg_uniqueKeys {
    return @[@"userId"];
}

+ (NSArray *)bg_ignoreKeys {
    return @[@"showName", @"isSelect"];
}
 
 
- (NSString *)bg_tableName {
    return [NSString stringWithFormat:@"%@", NSStringFromClass(self.class)];
}

+ (NSString *)bg_tableName {
    return [NSString stringWithFormat:@"%@", NSStringFromClass(self.class)];
}

+ (HJChatBlacklistModel *)modelWithDict:(NSDictionary *)dict {
    HJChatBlacklistModel *model = [[HJChatBlacklistModel alloc] init];
    model.userId = toString(dict[@"id"]);
    model.avatar = dict[@"profile_picture"];
    model.nickname = dict[@"nickname"];
    model.sessionId = dict[@"session_id"];
    model.account = HJUserInfo.userId;
    return model;
}


- (NSString *)showName {
//    if (!isEmptyString(self.remarks)) {
//        return self.remarks;
//    }
    if (!isEmptyString(self.nickname)) {
        return self.nickname;
    }
    return toString(self.userId);
}

@end
